Review


Problem 1
Create a project called DigitalSystem to classify signals using a Kohonen network. A digital system has a sampling frequency fs = 256 Hz (256 samples per seconds). The system operates with signals of frequency: 4 Hz, 8 Hz, 15 Hz, 22 Hz, 28 Hz and 34 Hz. A student is building a training set input to train a Kohonen network. Each training case has duration of one second. The first 100 cases have a frequency of 4 Hz (four complete cycles per case). The following 100 cases have a frequency of 8 Hz. The last 100 cases have a frequency of 34 Hz. The student is adding 10 % of noise to the cases. Write a program (called BuildTrainSet.lab) to create the trainSetIn.csv file with 256 columns and 600 rows. You may use a random phase to create different cases of the same frequency.

The formula below shows the relationship between the continuous time t, and discrete time n.

sin_fs

inputRow0

inputRow1

inputRow2

inputRow100

inputRow200

inputRow300

inputRow400

inputRow500

Problem 2
As the training set includes periodic signals, we may use the Fourier Transform to try to reduce the number of inputs in the Kohonen network. As phase information is not important, we can use the magnitude of the transformed signal. You may use the spectrum function that returns the magnitude of the Fast Fourier Transform of a signal removing completely phase information. Create the Transform.lab file to transform the data in the trainSeIn.csv file, and create the trainsSetFreq.csv file with the training set input in the frequency domain.

freqRow0

freqRow100

freqRow200

freqRow300

freqRow400

freqRow500

Problem 3
Reduce the number of inputs by removing those input variables (columns) with little information. That is those input variable with little variance. Write the Prune.lab file. First, we review the report from the trainSetFreq.csv file. From the report, it can be seen that many components have a standard deviation less than one (variance less than one). Second, we must remove the input variables (columns) that have a variance less than one.

freqReport

DigitalSystem\Prune.lab
//______________________________ Load the Input
Matrix trainSetFreq;
trainSetFreq.Load();
int numRows = trainSetFreq.GetRowCount();
//______________________________ Compute the Variance
Vector varianceInput = trainSetFreq.ColsVar();

//______________________________ Compute how many columns we keep
int count = 0;
. . .
//____________________________ Find which columns we keep
Vector keep;
keep.Create(count);
. . .
//_____________________________ Create the Pruned Train Set
Matrix prunedTrainSet;
prunedTrainSet = trainSetFreq.GetCols(keep);
prunedTrainSet.Save();


prunedRow0

prunedRow100

prunedRow200

prunedRow300

prunedRow400

prunedRow500

Problem 4
Write the Train.lab file to Create and train a Kohonen network to classify the signals (of problem 1) in the frequency domain. Use Multiplicative Input normalization.

trainError

Problem 5
Write the CheckTraining.lab file to check the training of the Kohonen network of the previous problem.

check0

check100

check200

check300

check400

check500

Problem 6
Review the behavior of the Kohonen network of problem 3. Write some conclusions about your results.

map00

map01

map02

map03

map04

map05

mapOverlap

© Copyright 2000-2021 Wintempla selo. All Rights Reserved. Jul 22 2021. Home